﻿namespace Skywave.Web
{
    public static class Extensions
    {
        public static string ReverseMapPath(this System.Web.HttpContext hc, string path)
        {
            string r = "";
            if (hc != null)
            {
                string appPath = hc.Server.MapPath("~");
                r = string.Format("~/{0}", path.Replace(appPath, "").Replace("\\", "/"));
            }
            return r;
        }
    }

}